﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OneMG.Phoenix.Service.Model;
using OneMG.Phoenix.Service.Contracts;
using OneMG.Phoenix.Service;

namespace OneMG.Phoenix.AdminSite.Views.Links
{
    public partial class Index : System.Web.UI.Page
    {
        ILinksService ILinks = new LinksService();

        public IList<LinksModel> listModle = new List<LinksModel>();


        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindData();
            }
        }

        private void BindData()
        {
            int total = 0;
            listModle = ILinks.GetPagedList(AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out total);
            AspNetPager1.RecordCount = total;

        }

        protected void AspNetPager1_PageChanged(object sender, EventArgs e)
        {
            BindData();
        }
    }
}
